<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="created" content="2018-10-23T06:18:10.521000000">
    <meta name="changed" content="2021-05-21T06:18:42.262000000">
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta http-equiv="Content-Language" content="en">
    <title>
      Register
    </title>
    <link rel="stylesheet" type="text/css" href="../../style.css">
  </head>
  <body>
    <div class="maindiv">
      <h1>
        <img class="iconlibs" src="../../../../icons/6464/register.png" alt="#########" width="32" height="32"> <em>Register</em>
      </h1>
      <table>
        <tbody>
          <tr>
            <td>
              <strong>Library:</strong>
            </td>
            <td>
              <a href="index.html">Memory</a>
            </td>
          </tr>
          <tr>
            <td>
              <strong>Introduced:</strong>
            </td>
            <td>
              2.0 Beta 1
            </td>
          </tr>
          <tr>
            <td valign="top">
              <strong>Appearance:</strong>
            </td>
			    <table>
        <tbody>
          <tr>
            <td>
              <strong>Library:</strong>
            </td>
            <td>
              <a href="index.html">Memory</a>
            </td>
          </tr>
          <tr>
            <td>
              <strong>Introduced:</strong>
            </td>
            <td>
              2.0 Beta 1
            </td>
          </tr>
          <tr>
            <td valign="top">
              <strong>Appearance:</strong>
            </td>
		    <td valign="top">
            <table>
                <tbody>
                  <tr>
                    <th width="50">
                     Logisim
                    </th>
                    <th width="50">
                     L-Evolution
                    </th>
                  </tr>
                  <tr>     
                    <td>
                      <img class="appearancelibs" src="../../../../img-libs/lregister.png" alt="#########" width="64" height="64">
                    </td>
					 <td>
                      <img class="appearancelibs" src="../../../../img-libs/hregister.png" alt="#########" width="64" height="64">
                    </td>					
                  </tr>
                </tbody>
              </table>
                 
            </td>
          </tr>
        </tbody>
      </table>
      <h2>
        Behavior
      </h2>
      <p>
        A register stores a single multi-bit value, which is displayed in hexadecimal within its rectangle, and is emitted on its <var>Q</var> output. When the clock input (indicated by a triangle on the south edge) indicates so, the value stored in the register changes to the value of the <var>D</var> input at that instant. Exactly when the clock input indicates for this to happen is configured via the Trigger attribute.
      </p>
      <p>
        The <var>reset</var> input resets the register's value to 0 (all zeroes) asynchronously; that is, as long as <var>reset</var> is 1, the value is pinned to 0, regardless of the clock input.
      </p>
      <h2>
        Pins
      </h2>
      <dl>
        <dt>
          East edge, labeled <var>Q</var> (output, bit width matches Data Bits attribute)
        </dt>
        <dd>
          Outputs the value currently stored by the register.
        </dd>
        <dt>
          West edge, labeled <var>D</var> (input, bit width matches Data Bits attribute)
        </dt>
        <dd>
          Data input: At the instant that the clock value rises from 0 to 1, the register's value changes to the value of the <var>D</var> input at that instant.
        </dd>
        <dt>
          West edge, labeled <var>en</var> (input, bit width 1)
        </dt>
        <dd>
          Enable: When this is 0, clock triggers are ignored. The current value continues to appear on the output. The clock triggers are enabled when this input is 1 or undefined.
        </dd>
        <dt>
          South edge, indicated with a triangle (input, bit width 1)
        </dt>
        <dd>
          Clock input: At the instant that this input value rises from 0 to 1 (the rising edge), the register's value will be updated to the value of the <var>D</var> input.
        </dd>
        <dt>
          South edge, labeled <var>0</var> (input, bit width 1)
        </dt>
        <dd>
          Asynchronous reset: When 0 or undefined, this input has no effect. As long as it is 1, the register's value is pinned to 0. This occurs asynchronously - that is, without regard to the current clock input value. As long as this is 1, the other inputs have no effect.
        </dd>
      </dl>
      <h2>
        Attributes
      </h2>
      <p>
        When the component is selected or being added, Alt-0 through Alt-9 alter its <q>Data Bits</q> attribute.
      </p>
      <dl>
        <dt>
          Data Bits
        </dt>
        <dd>
          The bit width of the value stored in the register.
        </dd>
        <dt>
          Trigger
        </dt>
        <dd>
          Configures how the clock input is interpreted. The value <q>rising edge</q> indicates that the register should update its value at the instant when the clock rises from 0 to 1. The <q>falling edge</q> value indicates that it should update at the instant the clock falls from 1 to 0. The <q>high level</q> value indicates that the register should update continuously whenever the clock input is 1. And the <q>low level</q> value indicates that it should update continuously when the clock input is 0.
        </dd>
        <dt>
          Label
        </dt>
        <dd>
          The text within the label associated with the register.
        </dd>
        <dt>
          Label Font
        </dt>
        <dd>
          The font with which to render the label.
        </dd>
      </dl>
      <h2>
        Poke Tool Behavior
      </h2>
      <p>
        Clicking the register brings keyboard focus to the register (indicated by a red rectangle), and typing hexadecimal digits will change the value stored in the register.
      </p>
      <h2>
        Text Tool Behavior
      </h2>
      <p>
        Allows the label associated with the component to be edited.
      </p>
      <p>
        <a href="../index.html">Back to <em>Library Reference</em></a>
      </p>
    </div>
  </body>
</html>
